package com.flannery.learningandroid

import android.content.Intent
import android.os.Bundle
import android.os.PersistableBundle
import androidx.appcompat.app.AppCompatActivity
import com.flannery.learningandroid.edittag.EditTagActivity
import com.flannery.learningandroid.learnview.*
import com.flannery.learningandroid.sample.mail.MailInputActivity

import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        testTextView.setOnClickListener {
            startActivity(Intent(this@MainActivity, TextViewActivity::class.java))
        }

        testButton.setOnClickListener {
            startActivity(Intent(this@MainActivity, ButtonActivity::class.java))
        }

        testMailInput.setOnClickListener {
            startActivity(Intent(this@MainActivity, MailInputActivity::class.java))
        }

        testEditTagView.setOnClickListener {
            startActivity(Intent(this@MainActivity, EditTagActivity::class.java))
        }

        testRelativeLayout.setOnClickListener {
            startActivity(Intent(this@MainActivity, RelativeLayoutActivity::class.java))
        }

        learningScrollview.setOnClickListener {
            startActivity(Intent(this@MainActivity, ScrollViewActivity::class.java))
        }
        learningRecyclerView.setOnClickListener {
            startActivity(Intent(this@MainActivity, RecyclerViewActivity::class.java))
        }

    }

    override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
        super.onCreate(savedInstanceState, persistentState)

    }

}